<?php
declare (strict_types = 1);

namespace app\service;

use thans\jwt\contract\Storage;
use think\Env;
use think\facade\Cache;

class tokenStore implements Storage
{

    public function delete($key)
    {
        return Cache::rm($key);
    }

    public function get($key)
    {
        return Cache::get($key);
    }

    public function set($key, $time = 10)
    {
        return Cache::set($key, time(), Env::get('JWT_TTL', 60));
    }
}
